import request from "../utils/request";

//获取部门信息
export const Get_Dept=()=>{
    return request({
        url:"api/Sys/Get_Department",
        method:"GET",
       
    })
}

//获取部门下的员工
export const Get_Dept_Employee=(obj)=>{
    return request({
        url:"api/Sys/Get_Dept_Employee",
        method:"GET",
       params:obj
    })
}

//获取部门下可选的岗位
export const Get_Dept_Post=(obj)=>{
    return request({
        url:"api/Sys/Get_Dept_Post",
        method:"GET",
       params:obj
    })
}

//获取部门下的所有岗位
export const Get_DeptByPost=(obj)=>{
    return request({
        url:"api/Sys/Get_DeptPost",
        method:"GET",
       params:obj
    })
}

//新增部门
export const Add_Dept=(obj)=>{
    return request({
        url:"api/Sys/Add_Dept",
        method:"POST",
       data:obj
    })
}

//删除部门
export const Delete_Dept=(obj)=>{
    return request({
        url:"api/Sys/Delete_Dept",
        method:"POST",
       data:obj
    })
}

//新增员工
export const Add_Employee=(obj)=>{
    return request({
        url:"api/Sys/Add_Employee",
        method:"POST",
       data:obj
    })
}

//编辑员工
export const Update_Employee=(obj)=>{
    return request({
        url:"api/Sys/Update_Employee",
        method:"POST",
       data:obj
    })
}

//删除员工
export const Delete_Employee=(obj)=>{
    return request({
        url:"api/Sys/Delete_Employee",
        method:"POST",
       data:obj
    })
}

//切换员工账号状态
export const ChangeIsBan_Employee=(obj)=>{
    return request({
        url:"api/Sys/ChangeIsBan_Employee",
        method:"POST",
       data:obj
    })
}

//获取所有岗位
export const Get_AllPost=(obj)=>{
    return request({
        url:"api/Sys/Get_AllPost",
        method:"GET",
       params:obj
    })
}

//新增岗位
export const Add_Post=(obj)=>{
    return request({
        url:"api/Sys/Add_Post",
        method:"POST",
       data:obj
    })
}

//获取岗位下的员工
export const Get_Post_Employee=(obj)=>{
    return request({
        url:"api/Sys/Get_Post_Employee",
        method:"GET",
       params:obj
    })
}

//删除岗位
export const Delete_Post=(obj)=>{
    return request({
        url:"api/Sys/Delete_Post",
        method:"POST",
       data:obj
    })
}
